<?php

namespace addons\oil\controller;

use addons\oil\controller\Base;
use addons\sum\model\User as UserModel;
use addons\oil\model\OrderAction as OrderActionModel;
use app\common\library\Auth;

class OrderAction extends Base
{

    protected $noNeedLogin = [''];
    protected $noNeedRight = ['*'];



    /**
     * 订单消息
     */
    public function index()
    {
//        $event=$this->request->request('event');
        $user = UserModel::info();
        $logs=OrderActionModel::where('user_id',$user->id)
            ->where('event','in',['cancel','pay','confirm','refund','refund_finish'])
            ->order('id','DESC')->paginate(10);
        $this->success('消息列表', $logs);
    }

}
